import Rx from 'rxjs';

const subjects = {
  incrementCounterSubject: new Rx.Subject(),
  decreaseCounterSubject: new Rx.Subject()
};

const CounterIntent = {
  subjects,
  incrementCounter: () => subjects.incrementCounterSubject.next(),
  decreaseCounter: () => subjects.decreaseCounterSubject.next()
}

// class CounterIntent {
//   constructor() {
//     this.incrementCounterSubject = new Rx.Subject()
//     this.decreaseCounterSubject = new Rx.Subject()
//   }
//
//   incrementCounter() {
//     return this.incrementCounterSubject.next()
//   }
//
//   decreaseCounter() {
//     return this.decreaseCounterSubject.next()
//   }
// }

export default CounterIntent;
